+1999-11-03 <jrb@redhat.com>
+
+ * src/io-gif.c (gif_get_extension): Read 'til the next empty block
+ correctly, now.
+
1999-11-02 Cody Russell <bratsche@dfw.net>
* src/gdk-pixbuf-drawable.c: Changed the behavior to return NULL
if part of the requested image is offscreen, rather than clipping
typedef unsigned char CMap[3][MAXCOLORMAPSIZE];
+
/* Possible states we can be in. */
enum {
GIF_START = 1,
{
context->state = GIF_GET_EXTENTION;
context->extension_flag = TRUE;
- context->extension_label = '\000';
+ context->extension_label = 0;
context->block_count = 0;
context->block_ptr = 0;
}
gint empty_block = FALSE;
if (context->extension_flag) {
- if (!context->extension_label) {
- if (!ReadOK (context, &context->extension_label , 1)) {
+ if (context->extension_label == 0) {
+ /* I guess bad things can happen if we have an extension of 0 )-: */
+ /* I should look into this sometime */
+ if (!ReadOK (context, & context->extension_label , 1)) {
return -1;
}
}
break;
}
}
- /* read all blocks, until I get an empty block */
- /* not sure why, but it makes it work. -jrb */
+ /* read all blocks, until I get an empty block, in case there was an extension I didn't know about. */
do {
retval = get_data_block (context, (unsigned char *) context->block_buf, &empty_block);
if (retval != 0)
return retval;
+ context->block_count = 0;
} while (!empty_block);
return 0;
if (c == '!') {
/* Check the extention */
gif_set_get_extension (context);
- continue;
+ return 0;
}
/* look for frame */